class CommentAddRequest {
  /// 1.帖子；2.评论
  int? resourceType;
  int? resourceId;
  String? text;
  String? image;
  String? audio;
  int? audioDuration;

  CommentAddRequest({
    this.resourceType,
    this.resourceId,
    this.text,
    this.image,
    this.audio,
    this.audioDuration,
  });

  factory CommentAddRequest.fromJson(Map<String, dynamic> json) {
    return CommentAddRequest(
      resourceType: json['resourceType'] as int?,
      resourceId: json['resourceId'] as int?,
      text: json['text'] as String?,
      image: json['image'] as String?,
      audio: json['audio'] as String?,
      audioDuration: json['audioDuration'] as int?,
    );
  }

  Map<String, dynamic> toJson() => {
        'resourceType': resourceType,
        'resourceId': resourceId,
        'text': text,
        'image': image,
        'audio': audio,
        'audioDuration': audioDuration,
      };
}
